package com.tanglongan.designPattern.dp06_adapter.demo01_class;

/**
 * 电源适配器实现类：实现了5V直流电和220V交流电的兼容
 */
public class PowerAdapter extends AC220 implements DC5 {
    @Override
    public int output5V() {
        int adapterInput = super.outputAC220();
        int adapterOutput = adapterInput / 44;
        System.out.println("使用Adapter输入AC：" + adapterInput + "V，输出DC：" + adapterOutput + "V");
        return adapterOutput;
    }

}
